package com.andy.buyu.server.dto;

import com.andy.buyu.server.game.GameConf;
import com.andy.buyu.server.game.GameUser;

import io.netty.buffer.ByteBuf;

/**
 * 使用道具掉落炮台
 * @author cuiwm
 */
public class UseBatteryMessage extends BaseMessage{
	
    private GameUser user;
    
    public UseBatteryMessage(GameUser user) {
    	this.user = user;
	}

	@Override
	public void writeBody(ByteBuf buf) {
		buf.writeByte(user.getLastShell());
		buf.writeInt(GameConf.getSpecialBullet(user.getLastShell()).getLimitTime());
		buf.writeByte(user.getLastShellNum());
	}


}